package com.qfedu.tantu.service.impl;

import com.qfedu.tantu.dao.AttractionsDao;
import com.qfedu.tantu.dto.Attractionsdto;
import com.qfedu.tantu.service.intf.AttractionsDtoService;
import com.qfedu.tantu.vo.R;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
 * YoungMan, may the force be with you.
 *
 * @Author: 吃个小布丁吧
 * @Date: 2022/07/01/18:42
 */
@Service
public class AttractionsDtoServiceImpl implements AttractionsDtoService {
    @Resource
    private AttractionsDao dao;
    @Override
    public R lookName(Attractionsdto dto) {
        if (dto!=null){
            //QueryWrapper<Attractions> wrapper = new QueryWrapper<>();
            List<Attractionsdto> attractionsdtos = dao.selectAll();
            return R.ok(attractionsdtos);
        }
        return R.fail();
    }

    @Override
    public R selectById(int id) {
        if (id==id){
            List<Attractionsdto> attractionsdtos = dao.selectById(id);
            return R.ok(attractionsdtos);
        }
        return R.fail();
    }
}